FROM registry.cn-shenzhen.aliyuncs.com/edana/atlassian-agent:1.3.1

ENV BITBUCKET_HOME=${ATLASSIAN_HOME}/bitbucket
ENV JVM_MINIMUM_MEMORY=1g
ENV JVM_MAXIMUM_MEMORY=2g

WORKDIR ${ATLASSIAN_INSTALL_DIR}

ADD atlassian-bitbucket-7.6.9.tar.gz .
RUN mv atlassian-bitbucket-7.6.9 bitbucket; \
        mkdir -p "${ATLASSIAN_HOME}/bitbucket";

COPY bitbucket-init.sh /docker-entrypoint-init.d

EXPOSE 7990 7999 5701

CMD ["./bitbucket/bin/start-bitbucket.sh", "-fg"]
